package com.crm.CLdriving.dto.req;


import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;

import io.swagger.annotations.ApiModel;
import lombok.Data;

@Data
@ApiModel("录入教练信息请求")
public class CoachInsertReqDto {
	
	private int id; //教练编号	
	
	@NotBlank(message="姓名不能为空")
	private String name; //姓名	
	
	@NotBlank(message="性别不能为空")
	private String sex; //性别	
	
	@Pattern(regexp="^[1][3,4,5,7,8][0-9]{9}$",message="电话号码错误")
	@NotBlank(message="联系电话不能为空")
	private String phone;  //联系电话
	
	@Min(value=1,message="年龄 1-100")	
	@Max(value=100,message="年龄 1-100")	
	private Integer age; //年龄	
	private String address;  //联系地址	
	
	@Pattern(regexp = "^(\\d{18,18}|\\d{15,15}|(\\d{17,17}[x|X]))$", message = "身份证格式错误")
	private String identity;  //身份证号
	
}
